package com.example.sxmall.dao.mapper;

import com.example.sxmall.dao.pojo.Users;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import java.util.List;

@Mapper
public interface UserMapper {

    /**
     * 查找用户
     * @param utel
     * @param upwd
     * @return
     */
    public Users findUserByTelAndPwd(@Param("utel") String utel,@Param("upwd") String upwd);

    /**
     * 查看用户列表
     * @param
     * @return
     */
    public List<Users> listUsers();

    /**
     * 根据名称模糊查找用户
     * @param uname
     * @return
     */
    public List<Users> findUsersByName(@Param("uname") String uname);

    /**
     * 根据ID查找用户
     * @param uid
     * @return
     */
    public Users findUsersById(@Param("uid") Integer uid);

    /**
     * 添加
     * @param users
     * @return
     */
    public int insertUsers(@Param("users") Users users);

    /**
     * 删除
     * @param uid
     * @return
     */
    public int deleteUsers(@Param("uid") Integer uid);

    /**
     * 修改
     * @param users
     * @return
     */
    public int updateUsers(@Param("users") Users users);
}
